#Insertion Sort ''' Pseudocode Solution n = length of array for p = 1 to n-1 temp = array[p] j = p while (j>0 and (array[j-1] >temp)) array[j] = array[j-1] j = j - 1 array[j] = temp ''' def insertionSort(myList): n=len(myList) for p in range (1,n): temp=myList[p] j=p while (j>0 and (myList[j-1] >temp)): myList[j] = myList[j-1] j=j-1 myList[j]=temp myList = [54,26,93,17,77,31,44,55,20] insertionSort(myList) print(myList)